﻿package  
{
	
	/**
	* ...
	* @author DefaultUser (Tools -> Custom Arguments...)
	*/
	public class Sandwich extends PickUp
	{
		
		public function Sandwich(X:Number,Y:Number,animation:AnimatedSprite) 
		{
			super(X, Y);
			var sandwichEat:Animation = new Animation(11);
			var sandwich:Animation = new Animation(1);
				
				
			sandwich.FramesPerSecond = 1;
			sandwichEat.FramesPerSecond = 30;
				
			this.scaleX = 0.65;
			this.scaleY = this.scaleX;
			this._animation = animation;
			
			
			
			

			this._animation.Animations["sandwich"] = sandwich;
			this._animation.Animations["sandwich_eat"] = sandwichEat;
			this._animation.CurrentAnimation = "sandwich";
			this.addChild(_animation);
			
			
		}
		public override function dispose():void
		{
			Main.hud.score += 100 * Main.hud.multi;
			Main.hud.multi += 1;
			this._animation.CurrentAnimation = "sandwich_eat";
			super.dispose();
			Main.sound.play("sandwich_eat");
		}
		
	}
	
}